﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lesson01
{
    public partial class Home : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.ddlUserType.SelectedValue == "Guest")
            {
                this.txtPassword.Visible = false;
                this.lblPassword.Visible = false;

                this.lblUserName.Text = "Email address:";
                this.btnLogon.Text = "Visit";
            }
            else
            {
                this.txtPassword.Visible = true;
                this.lblPassword.Visible = true;
                this.lblUserName.Text = "User name:";
                this.btnLogon.Text = "Log on";
            }
        }

        protected void btnLogon_Click(object sender, EventArgs e)
        {
            this.Response.Redirect("Default.aspx");
        }
    }
}